'use strict';
let brick_ns = new function() {
	let { BaseNode } = nodes_ns;
	
	let BrickNode = this.BrickNode = class extends BaseNode {
		constructor(p = {}) {
			super(p);
			
			this.color = p.color||'#774400';
			this.layer = p.layer||1;
		}
		
		draw(ctx, pos = this.globalPos, scale = this.globalScale) {
			ctx.save();
			ctx.beginPath();
			ctx.strokeStyle = this.color;
			ctx.strokeRect(pos.x, pos.y, this.size.x*scale.x, this.size.y*scale.y);
			ctx.restore();
		}
	};
};
